package com.fittinghome.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fittinghome.entity.FitOrder;
import com.fittinghome.entity.FitOrderdetail;
import com.fittinghome.mapper.FitOrderMapper;
import com.fittinghome.mapper.FitOrderdetailMapper;
import com.fittinghome.service.IFitOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * 购买订单表 服务实现类
 * </p>
 *
 * @author sprout
 * @since 2021-04-14
 */
@Service
public class FitOrderServiceImpl extends ServiceImpl<FitOrderMapper, FitOrder> implements IFitOrderService {

    @Autowired
    private FitOrderdetailMapper orderdetailMapper;

    @Autowired
    private FitOrderMapper orderMapper;

    public List<FitOrder> getOrders()
    {


        QueryWrapper<FitOrderdetail> wrapper=new QueryWrapper<>();
        wrapper.in("gid", Arrays.asList("aaaa", "aaaa", "aaaa"));
        List<FitOrderdetail> fitOrderdetails = orderdetailMapper.selectList(wrapper);

        return null;
    }

    /**
     * @Description: 根据gid查订单信息
     * @param gid: 
     * @return: java.util.List<com.fittinghome.entity.FitOrder>
     * @Author: MiaoMiao "Sprout" BI
     * @Date: 2021-15-16 13:15
     */
    public List<FitOrder> selectOrders(String gid)
    {
        return orderMapper.selectOrders(gid);
    }
}
